const {DataTypes} = require("sequelize")
const sequelize = require("../config/dbConnect")

module.exports = sequelize.define("ask", {
    askContent: {
        type: DataTypes.STRING(1234),
        allowNull: false,
        comment: '咨询内容'
    },
    replyContent: {
        type: DataTypes.STRING(1234),
        allowNull: true,
        comment: '回复内容'
    },
    createTime: {
        type: DataTypes.DATE,
        allowNull: false,
        defaultValue: DataTypes.NOW,
        comment: '咨询创建时间'
    },
    updateTime: {
        type: DataTypes.DATE,
        allowNull: true,
        comment: '回复时间'
    }
}, {
    freezeTableName: true, // 禁止默认的自动复数化
    createdAt: false, // 关闭默认字段
    updatedAt: false // 关闭默认字段
})